/**
 * 
 */
package leetCode;

/**
 * @author zhongfang
 *
 */
public class LongestContinuousIncreasingSubsequence {
	public int findLengthOfLCIS(int[] nums) {
		int count = 0;
		int max = 0;
		for (int i = 0; i < nums.length; i++) {
			if (i == 0 || nums[i] <= nums[i - 1]) {
				max = Math.max(max, count);
				count = 1;
			} else {
				count++;
			}
		}
		max = Math.max(max, count);
		return max;
	}

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		int[] nums = { 2, 2, 2, 2, 2 };
		System.out.println(new LongestContinuousIncreasingSubsequence().findLengthOfLCIS(nums));
	}

}
